package com.dailyblue.java.project.smbms.stocklog.controller;

import com.dailyblue.java.commons.util.JsonResult;
import com.dailyblue.java.commons.util.ResultTool;
import com.dailyblue.java.project.smbms.stocklog.bean.StockLog;
import com.dailyblue.java.project.smbms.stocklog.service.StockLogService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/stocklog")
public class StockLogController {
    @Resource
    private StockLogService stockLogService;

    @PostMapping
    public JsonResult save(StockLog stockLog) {
        stockLogService.saveStockLog(stockLog);
        return ResultTool.success();
    }
}
